﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="DataPager.ascx.cs" Inherits="control_common_DataPager" %>

<table cellspacing="5">
    <tr>
        <td>
            <asp:LinkButton ID="firstPage" runat="server" OnClick="firstPage_Click" ToolTip="Go to first page" />
        </td>
        <td>
            <asp:LinkButton ID="prevPage" runat="server" OnClick="prevPage_Click" ToolTip="Go to previous page" />
        </td>
        <td>
            <asp:Repeater ID="pageLinks" runat="server">
                <SeparatorTemplate>&nbsp;</SeparatorTemplate>
                <ItemTemplate>
                    <asp:LinkButton ID="pageLink" runat="server" CommandName="pageChange"  
                        Text='<%# DataBinder.Eval(Container.DataItem, "pageIndex")%>' OnCommand="ChangePage"
                        CommandArgument='<%# DataBinder.Eval(Container.DataItem, "pageIndex")%>'>
                    </asp:LinkButton>
                </ItemTemplate>
            </asp:Repeater>
        </td>
        <td>
            <asp:LinkButton ID="nextPage" runat="server" OnClick="nextPage_Click" ToolTip="Go to next page" />
        </td>
        <td>
            <asp:LinkButton ID="lastPage" runat="server" OnClick="lastPage_Click" ToolTip="Go to last page" />
        </td>
    </tr>
</table>